﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LucyGridCli
{
	class Emit: ICommand
	{

		public string Name()
		{
			return "emit";
		}

		public string Usage()
		{
			return string.Join("\r\n",
					new string[]{
						"emit event [value] [[-param1] [value1] [-param2] [value2] ... [-paramN] [valueN]]",
						"			-nowait",
						string.Empty,
						"Emits a new message to the grid and waits 10 seconds for receiving answers."
					});
		}

		public string Run(string[] args)
		{
			new LucyGrid.GridComm().Emit("CLI", args[0], args[1]);
			return null;
		}
	}
}
